﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Md.Demo.Entity
{
    public class ResponseMessage
    {
        public ResponseMessage()
        {
            this.errno = 0;
            this.errmsg = "success";
        }
        public ResponseMessage(int errno, string msg, dynamic data = null)
        {

            this.errno = errno;
            this.errmsg = msg;
            this.data = data;
        }
        public ResponseMessage(dynamic data)
        {
            this.errno = 0;
            this.errmsg = "success";
            this.data = data;
        }

        /// <summary>
        /// 错误代码  0是 正常   400 参数或语法错误 其他是失败
        /// </summary>
        public int errno { get; set; }
        /// <summary>
        /// 错误信息 
        /// </summary>

        public string errmsg { get; set; }
        /// <summary>
        /// 当请求正常时候返回的数据
        /// </summary>

        public dynamic data { get; set; }
    }
}
